<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <link rel="stylesheet" href="../../css/base/jquery-ui-1.10.3.css" type="text/css">
    <link rel="stylesheet" href="../../plugin/bootstrap-3.3.7/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../css/job.css">
    <title>公交路线规划－使用默认样式</title>
    <link rel="stylesheet" href="https://cache.amap.com/lbs/static/main.css"/>
    <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.3&key=07b05348abcb08a58dc85263b6f8e060"></script>
    <style type="text/css">
        #panel {
            position: fixed;
            background-color: white;
            max-height: 90%;
            overflow-y: auto;
            top: 50px;
            width: 100%;
        }
        .amap-lib-transfer{
            padding: 20px!important;
        }
    </style>

</head>
<body>
<div class="row header">
    <div style="padding-left: 10px;"><span id="back" class="glyphicon  glyphicon-chevron-left" style="float: left;cursor: pointer;"></span>公交查询</div>
</div>
<div id="mapContainer" style="visibility: hidden"></div>
<div id="panel">
</div>
<script type="text/javascript">
    var map = new AMap.Map("mapContainer", {
        resizeEnable: true,
        center: [116.397428, 39.90923],//地图中心点
        zoom: 13 //地图显示的缩放级别
    });
    /*
     * 调用公交换乘服务
     */
    //加载公交换乘插件
    AMap.service(["AMap.Transfer"], function() {
        var transOptions = {
            map: map,
            panel:panel,
            city: '北京市',                            //公交城市
            //cityd:'乌鲁木齐',
            policy: AMap.TransferPolicy.LEAST_TIME //乘车策略
        };
        //构造公交换乘类
        var trans = new AMap.Transfer(transOptions);
        //根据起、终点坐标查询公交换乘路线
        var add1 = sessionStorage.address2;//用户地址
        var add2 = sessionStorage.address1;//酒店地址
        trans.search([{keyword:add1},{keyword:add2}], function(status, result){
        });
    });
</script>
<script type="text/javascript" src="https://webapi.amap.com/demos/js/liteToolbar.js"></script>
<script src="../../js/common/jquery-2.1.4.min.js"></script>
<script src="../../js/index.js"></script>
</body>
</html>